package com.lk.data.bpf.test;

import java.util.Date;

import com.mapbox.geojson.Point;
import com.mapbox.turf.TurfConstants;
import com.mapbox.turf.TurfMeasurement;
import com.uam.core.entity.uitls.DateUtil;
import com.uam.core.entity.uitls.SpatialUtil;

public class A {

	public static void main(String[] args) {
		System.out.println("交叉点：" + DateUtil.date2Str(new Date(1701836404000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("上一个：" + DateUtil.date2Str(new Date(1701836378000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("避让点：" + DateUtil.date2Str(new Date(1701836404000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("交叉点下一个：" + DateUtil.date2Str(new Date(1701836430000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("交叉点下一个更新后：" + DateUtil.date2Str(new Date(1701836430000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println(SpatialUtil.computeDistance(113.0512174057, 28.1372637992, 113.0642909609,28.2019157081));
		System.out.println("速度慢1：" + DateUtil.date2Str(new Date(1701836378000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("速度慢2：" + DateUtil.date2Str(new Date(1701836404000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("速度慢3：" + DateUtil.date2Str(new Date(1701836430000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("速度快1：" + DateUtil.date2Str(new Date(1701836424000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("速度快2：" + DateUtil.date2Str(new Date(1701836440000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println("速度快3：" + DateUtil.date2Str(new Date(1701836456000L), "yyyy-MM-dd HH:mm:ss"));
		System.out.println((int) -0.50D);
		System.out.println(Math.sqrt(-1.00D));
		Point point = Point.fromLngLat(113.0513871092D, 28.2013147903D);
		System.out.println(TurfMeasurement.destination(point, 5000.00D, 0.00D, TurfConstants.UNIT_METERS));
		System.out.println(TurfMeasurement.destination(point, 5000.00D, 90.00D, TurfConstants.UNIT_METERS));
		System.out.println(TurfMeasurement.destination(point, 5000.00D, 180.00D, TurfConstants.UNIT_METERS));
		System.out.println(TurfMeasurement.destination(point, 5000.00D, 270.00D, TurfConstants.UNIT_METERS));
		System.out.println(Math.ceil(9.00D / 5.00D));
		System.out.println(Math.ceil(10.00D / 5.00D));
		System.out.println(Math.ceil(11.00D / 5.00D));
		System.out.println(SpatialUtil.computeDistance(112.99073, 28.209406, 112.99058581939185, 28.20952296266279));
		System.out.println(SpatialUtil.computeDistance(112.99058581939185, 28.20952296266279, 112.99044163862584, 28.209639925325572));
		System.out.println(SpatialUtil.computeDistance(112.99044163862584, 28.209639925325572, 112.99029745770194, 28.209756887988355));
		System.out.println(SpatialUtil.computeDistance(112.99029745770194, 28.209756887988355, 112.99015327662016, 28.20987385065114));
		System.out.println(SpatialUtil.computeDistance(112.99015327662016, 28.20987385065114, 112.9900090953805, 28.20999081331393));
		System.out.println(SpatialUtil.computeDistance(112.9900090953805, 28.20999081331393, 112.989999, 28.209999));
		double startLon = 113.0512174057D;
		double startLat = 28.1372637992D;
		double endLon = 113.0642909609D;
		double endLat = 28.2019157081D;
		Point startPoint = Point.fromLngLat(startLon, startLat);
		Point middlePoint = TurfMeasurement.destination(startPoint, SpatialUtil.computeDistance(startLon, startLat, endLon, endLat) / 2.00D, TurfMeasurement.bearing(startPoint, Point.fromLngLat(endLon, endLat)),
				TurfConstants.UNIT_METRES);
		System.out.println(SpatialUtil.computeCosine(startLon, startLat, middlePoint.longitude(), middlePoint.latitude(), endLon,
							endLat));
		System.out.println(Math.cos(0.000001D * 0.0174533D));
		System.out.println(Math.PI / 180.00D);
	}

}
